#ifndef CORE_PORTME_H
#define CORE_PORTME_H

#define HAS_STDIO 1

#if 1
#define HAS_PRINTF 1
#else
static inline int ee_printf(const char *s, ...) { return 0; }
#endif


#define MULTITHREAD 1
#define MEM_METHOD MEM_STATIC
#define MEM_LOCATION "heap"
#define USE_CLOCK 0
#define MAIN_HAS_NOARGC 1
#define SEED_METHOD SEED_VOLATILE

#define PERFORMANCE_RUN 1
#ifndef ITERATIONS
#define ITERATIONS 40
#endif

typedef unsigned int ee_u32;
typedef unsigned short ee_u16;
typedef unsigned char ee_u8;
typedef int ee_s32;
typedef short ee_s16;
typedef char ee_s8;
typedef unsigned long ee_size_t;
typedef unsigned long ee_ptr_int;

#define CORE_TICKS unsigned long long

#define NULL ((void*)0)

typedef struct
{
  char portable_id;
} core_portable;

void portable_init(core_portable *p, int *argc, char *argv[]);
void portable_fini(core_portable *p);

#ifndef COMPILER_VERSION 
 #ifdef __GNUC__
 #define COMPILER_VERSION "GCC"__VERSION__
 #else
 #define COMPILER_VERSION "Please put compiler version here (e.g. gcc 4.1)"
 #endif
#endif
#ifndef COMPILER_FLAGS 
 #define COMPILER_FLAGS "unknown"
#endif

extern ee_u32 default_num_contexts;
/* align an offset to point to a 32b value */
#define align_mem(x) (void *)(4 + (((ee_ptr_int)(x) - 1) & ~3))

#endif
